package com.rboat.blog.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rboat.blog.mapper.BlogFriendMapper;
import com.rboat.blog.domain.BlogFriend;
import com.rboat.blog.service.IBlogFriendService;
import com.rboat.common.core.text.Convert;

/**
 * 好友Service业务层处理
 * 
 * @author rboat
 * @date 2019-11-05
 */
@Service
public class BlogFriendServiceImpl implements IBlogFriendService 
{
    @Autowired
    private BlogFriendMapper blogFriendMapper;

    /**
     * 查询好友
     * 
     * @param id 好友ID
     * @return 好友
     */
    @Override
    public BlogFriend selectBlogFriendById(String id)
    {
        return blogFriendMapper.selectBlogFriendById(id);
    }

    /**
     * 查询好友列表
     * 
     * @param blogFriend 好友
     * @return 好友
     */
    @Override
    public List<BlogFriend> selectBlogFriendList(BlogFriend blogFriend)
    {
        return blogFriendMapper.selectBlogFriendList(blogFriend);
    }

    /**
     * 新增好友
     * 
     * @param blogFriend 好友
     * @return 结果
     */
    @Override
    public int insertBlogFriend(BlogFriend blogFriend)
    {
        return blogFriendMapper.insertBlogFriend(blogFriend);
    }

    /**
     * 修改好友
     * 
     * @param blogFriend 好友
     * @return 结果
     */
    @Override
    public int updateBlogFriend(BlogFriend blogFriend)
    {
        return blogFriendMapper.updateBlogFriend(blogFriend);
    }

    /**
     * 删除好友对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBlogFriendByIds(String ids)
    {
        return blogFriendMapper.deleteBlogFriendByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除好友信息
     * 
     * @param id 好友ID
     * @return 结果
     */
    @Override
    public int deleteBlogFriendById(String id)
    {
        return blogFriendMapper.deleteBlogFriendById(id);
    }
}
